<template>
<div>
  <el-card v-for="(info, index) in information" :key="index" shadow="never" class="info-card">
    <div slot="header" v-if="info.title !== ''"><span>{{ info.title }}</span></div>
    <el-form label-width="180px" inline>
      <el-form-item v-for="(item, index) in info.items" :key="index" :label="item.label">
        <span :style="{color: item.color}">{{ item.value }}</span>
      </el-form-item>
    </el-form>
  </el-card>
</div>
</template>

<style lang="scss">
  .info-card {
    border: 2px solid #ebeef5;
    margin-bottom: 10px;
    
    >.el-card__body {
      padding: 5px;
      .el-form-item {
        margin: 0;
      }
    }
  }
</style>


<script>
export default {
  name: 'infoForm',
  data() {
    return {
    }
  },
  props: {
    information: {
      type: Array,
      require: true
    }
  }
}
</script>